Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add new multi-route vehicles channel #214

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

EmmaSimon
Copy link
Contributor

Summary

Ticket: Green Line vehicles don't load in filtered Stop Details

For the grouped green line stop pages, we need to connect to a vehicles channel that can return multiple routes at once, but the existing one only supports a single route ID. This adds a new channel which accepts any number of route IDs and returns all vehicles matching them.

@EmmaSimon EmmaSimon requested a review from a team as a code owner October 9, 2024 17:01
@EmmaSimon EmmaSimon requested review from boringcactus and removed request for a team October 9, 2024 17:01
Copy link
Member

@boringcactus boringcactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a separate topic rather than accepting a list in route_id in the existing topic?

end

@impl true
def join("vehicles:routes:" <> topic_param_concat, _payload, socket) do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a separate topic rather than accepting a list in route_id in the existing topic?

@boringcactus @KaylaBrady and I talked in the office yesterday, and we decided that in general we should move towards putting params into the topic names, to make it possible to connect to the same channel with different params if we need to.

Copy link

github-actions bot commented Oct 9, 2024

Coverage of commit 09bd887

Summary coverage rate:
  lines......: 79.7% (1363 of 1710 lines)
  functions..: 69.6% (569 of 817 functions)
  branches...: no data found

Files changed coverage rate:
                                                                         |Lines       |Functions  |Branches    
  Filename                                                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================================================
  lib/mobile_app_backend_web/channels/vehicles_for_route_channel.ex      |92.6%     27| 100%     9|    -      0

Download coverage report

@EmmaSimon EmmaSimon merged commit ee83b1d into main Oct 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants